<?php
namespace soa\vhome\v2\waybill;

use soa\client;

class Cainiao  extends client
{
    /**
     * 服务地址
     * @var string
     */
    public $service_url = 'http://vhome.kuaidihelp.com';

    /**
     * 服务名称
     * @var string
     */
    protected $service_name = 'kuaidihelp_mp';

	//查询授权信息
	public function index($uid,$platform){
		return $this->post("/v2/waybill/Cainiao/index",compact('uid','platform'));
	}

	//查询网点信息
	public function waybillSearch($uid,$platform,$auth_id){
		return $this->post("/v2/waybill/Cainiao/waybillSearch",compact('uid','platform','auth_id'));
	}

	//申请运单号
	public function openWaybillGet($uid,$platform,$auth_id,$address,$cp_code,$branch_code,$orderInfo){
		$address = is_array($address) ? json_encode($address) : $address;
		return $this->post("/v2/waybill/Cainiao/openWaybillGet",compact('uid','platform','auth_id','address','cp_code','branch_code','orderInfo'));
	}
}